﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Universum.Model.Domain;

namespace Universum.Infrastructure.Persistence.Queries
{
	public class ResourcesByPaths : IDomainQuery<Model.Domain.Resource>
	{
		public ResourcesByPaths(IList<string> paths)
		{
			Expression = 
				resource => 
					paths.Any(path => path.EndsWith(resource.Path));
		}
		#region IDomainQuery<Resource> Members

		public System.Linq.Expressions.Expression<Func<Model.Domain.Resource, bool>> Expression
		{
			get;
			private set;
		}

		#endregion
	}
}
